#include<iostream>
#include<string>
using namespace std;
int main()
{
    int n, t;
    cin >> n >> t;
    string s;
    cin >> s;
    long long pos = s.find(".");
    if (pos == string::npos)
    {
        cout << s << endl;
        return 0;
    }
    for (int i = pos + 1;i < s.size();i++)
    {
        if (s[i] >= '5')
        {
            s.erase(i);
            i--;
            t--;
            while (s[i] == '4' && t != 0)
            {
                s.erase(i);
                i--;
                t--;
            }
            if (s[i] == '.')
            {
                s.erase(i--);
                while (s[i] == '9')
                {
                    s[i--] = '0';
                }
                if (i == -1)
                {
                    cout << '1';
                }
                else
                {
                    s[i]++;
                }
            }
            else
            {
                s[i]++;
            }

        }

    }
    cout << s << endl;
    return 0;
}
